package com.kmzx.one.project.config.listener;

import com.kmzx.one.project.events.UpdateSkuEvent;
import com.kmzx.one.project.mapper.WarehouseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;


@Component(value = "updateSkuEventListener")
public class UpdateSkuEventListener {

    @Autowired
    WarehouseMapper warehouseMapper;

    @Async
    @EventListener(classes = {UpdateSkuEvent.class})
    @Transactional(rollbackFor = Exception.class)
    public void defaultUpdateSkuEvent(UpdateSkuEvent updateSkuEvent) {

        String content = updateSkuEvent.getContent();



    }
}
